/*
 * Main.java
 *
 * Created on February 3, 2008, 12:34 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package projectprophet.app;

import projectprophet.core.*;

/**
 *
 * @author luppy
 */
public class Main
{
	public static void main(String[] args)
	{
		//createTestProject();
		
		project = createTestProject();

		java.awt.EventQueue.invokeLater(new Runnable()
		{
			public void run()
			{
				new MainWindow().setVisible(true);
			}
		});
	}
	
	public static Project createTestProject()
	{
		Project project = new Project();
		
		Developer luppy = project.new Developer();
		luppy.setName("Luppy");
		Developer developer2 = project.new Developer();
		developer2.setName("developer2");

		Task task1 = project.new Task();
		task1.setName("Task1");
		task1.assignDeveloper(luppy);
		
		Task task2 = project.new Task();
		task2.setName("Task2");
		task2.assignDeveloper(luppy);

		Task task3 = project.new Task();
		task3.setName("Task3");
		task3.assignDeveloper(developer2);

		return project;
	}
	
	

	public static Project getProject()
	{
		return project;
	}
	
	public static GUIContext getGUIContext()
	{
		return guiContext;
	}

	public static void newProject()
	{
		project = new Project();
		guiContext = new GUIContext();
	}
	
	private static Project project;
	private static GUIContext guiContext;
	static
	{
		newProject();
	}
}
